#ifndef NODE_H
#define NODE_H
#include <QGraphicsItem>
#include <QObject>

class Node : public QObject, public QGraphicsItem
{
    Q_OBJECT
public:
    Node(qint32 width, qint32 height);

protected:
    QRectF boundingRect() const override;
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr) override;
    void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
private:
    qint32 width;
    qint32 height;
    void init();
};



class Socket : public QObject, public QGraphicsItem
{
    Q_OBJECT
public:
    Socket();
protected:
    QRectF boundingRect() const override;
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr) override;
};

#endif // NODE_H
